import request from "@/utils/request";

//分页查询
export const queryPageApi = (data) => request.get("/users", { params: data });

// 添加
export const saveApi = (data) => request.post("/users", data);

// 根据id查询
export const queryByIdApi = (id) => request.get(`/users/${id}`);

// 修改
export const updateApi = (data) => request.put("/users", data);

// 删除
export const deleteApi = (ids) => request.delete(`/users/${ids}`);

// 查询所有部门
export const queryAllDeptsApi = () => request.get("/depts/list");

// 查询所有角色
export const queryAllRolesApi = () => request.get("/roles/list");
